package com.example.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 商品信息表
 * </p>
 *
 * @author yzy
 * @since 2025-08-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Product对象", description = "商品信息表")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品的ID，主键自增")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商品名")
    private String name;

    @ApiModelProperty(value = "商品的简介")
    private String detail;

    @ApiModelProperty(value = "商品封面的列表")
    private String coverList;

    @ApiModelProperty(value = "新旧程度")
    private Integer oldLevel;

    @ApiModelProperty(value = "所属商品分类的ID")
    private Integer categoryId;

    @ApiModelProperty(value = "发布者用户ID")
    private Integer userId;

    @ApiModelProperty(value = "库存")
    private Integer inventory;

    @ApiModelProperty(value = "价格")
    private BigDecimal price;

    @ApiModelProperty(value = "是否支持砍价")
    private Boolean isBargain;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;


}
